<template>
  <!-- 触发自定义事件，没有listeners -->
  <p>{{ modelValue }}</p>
  <button @click="$emit('update:modelValue', modelValue + 1)">add</button>
</template>

<script>
export default {
  name: "A",
  props: ["modelValue"],
  emits: ["update:modelValue"],
};
</script>

<style scoped>
</style>
